<include file="Public:header" />
<div class="panel panel-default"> 
  <!-- Default panel contents -->
  <div class="panel-heading">书籍列表 <a class="btn btn-primary btn-xs"  href="__URL__/add_book" style="display:block; float:right;"><i class="glyphicon glyphicon-plus"></i>添加新书</a> <form action="__URL__/book_list" style=" float:right;" method="post"><button style="float:right;margin-right: 20px;" type="submit" class="btn btn-default btn-xs">搜索</button><span style="float:right;">
    <select class="form-control input-sm" name="type_name" style="width:100px;height: 22px;padding-top: 0px; padding-bottom: 0px;">
      <option value="">全部</option>
      <foreach name="type_list" item="type" >
        <option value="{$type.order}">{$type.type_name}</option>
      </foreach>
    </select>
    </span></form> </div>
  <table class="table table-striped table-bordered table-hover">
    <thead>
      <tr>
        <th width="100px">#</th>
        <th>缩略图</th>
        <th>书籍名称</th>
        <th width="120">作者</th>
        <th width="80">类型</th>
        <th width="60">状态</th>
        <th width="150">日期</th>
        <th width="135">操作</th>
      </tr>
    </thead>
    <tbody>
      <foreach name="book_list" item="book">
        <tr>
          <th scope="row"><a href="__MODULE__/LookBook/index/?id={$book._id}">{$book._id}</a></th>
          <td><a href="__MODULE__/LookBook/index/?id={$book._id}"><img src="{$book.thumbnail}" width="60px" height="80px"/></a></td>
          <td><a href="__MODULE__/LookBook/index/?id={$book._id}">{$book.book_name}</a></td>
          <td>{$book.author}</td>
          <td>{$book.type_name}</td>
          <td><if condition="$book.status eq '1'">已发布
              <else />
              未发布</if></td>
          <td>{$book.datetime}</td>
          <td ><a class="btn btn-info btn-xs" href="__MODULE__/LookBook/index/?id={$book._id}"><i class="glyphicon glyphicon-search"></i>看</a> <a class="btn btn-primary btn-xs" href="__URL__/edit_book/?id={$book._id}"><i class="glyphicon glyphicon-pencil"></i>改</a> <a class="btn btn-danger  btn-xs" href="javascript:if(confirm('删除吗？'))window.location.href='__URL__/del_book/?id={$book._id}';"><i class="glyphicon glyphicon-trash"></i>删</a> 
            <!--<a class="btn btn-info btn-xs" href="__URL__/edit_book/?id={$book._id}">查看</a>
          		<a class="btn btn-primary btn-xs" href="__URL__/edit_book/?id={$book._id}">修改</a>
                <a class="btn btn-danger  btn-xs" href="__URL__/del_book/?id={$book._id}">删除</a>-->
          </td>
        </tr>
      </foreach>
    </tbody>
  </table>
</div>
<link href="__PUBLIC__/static/css/page.css" rel="stylesheet" type="text/css" />
<div class="scott">{$page}</div>
<include file="Public:footer" />